import java.util.Scanner;

public class Test2_10 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        // 提示用户输入水的重量
        System.out.print("Enter the amount of water in kilogram:");
        double water_weight = input.nextDouble();
        // 提示用户输入初始温度
        System.out.print("Enter the initial temperature:");
        double initial_temperature = input.nextDouble();
        // 提示用户输入最终温度
        System.out.print("Enter the final temperature:");
        double final_temperature = input.nextDouble();
        // 计算能量
        double energy = water_weight * (final_temperature - initial_temperature) * 4184;
        // 输出计算结果
        System.out.print("The energy needed is " + String.format("%.1f", energy));
    }
}
